Technical Q&A

TB46 - System Menu IDs (17-December-98)


Q: The Help, Keyboard, and Application menus at the right of the Macintosh menu bar don't have text titles that can be included in a command string in the way that "File" or "Edit" can be. Do these menus always have the same menu ID?

A: Yes. The menu IDs of the Help, Keyboard, and Application menus are always the same, so the menus can always be identified by their IDs via a call to GetMenuHandle:

enum
{
    kMenuHelpID             = -16490, // value also in "Balloons.h"
    kMenuKeyboardID         = -16491,
    kMenuApplicationID      = -16489
};

Note that passing kMenuHelpID to GetMenuItemHandle may obtain the menu handle of the global help menu, which is generally not what you want. To customize the Help menu, call HMGetHelpMenuHandle.

Further Reference:

Inside Macintosh: Menu Manager
Inside Macintosh: Help Manager



-- Pete Gontier
Worldwide Developer Technical Support

Technical Q&As | Contents
Previous Question | Next Question

To contact us, please use the Contact Us page.